import * as BASE from '@/stores/definitions-base';
import { t } from '@lingui/macro';
import React from 'react';

const {
  DATETIME_TEXT,
  DATE_TEXT,
  TIME_TEXT,
  EMPTY_TEXT,
  ENUMS: ENUMSBase,
  FieldsGrid: FieldGridBase,
  TitleGrid,
  column: columnBase,
  toSelectDataSource,
} = BASE;
export { DATETIME_TEXT, DATE_TEXT, EMPTY_TEXT, TIME_TEXT, TitleGrid, toSelectDataSource };

export function column(...args) {
  return columnBase(orderModel, ...args);
}

export function FieldsGrid(props) {
  return <FieldGridBase model={orderModel} {...props} />;
}

//----------------------------------------------------------------------
export const ENUMS = {
  ...ENUMSBase,
};

export const MAGIC_NUMBERS = {
  // 订单类型
  ORDER_TYPE: {
    // 包车
    CC: 1,
    // 专线
    SC: 2,
    // 大巴
    BUS: 3,
  },
};

export const orderModel = {
  reviewerName: {
    label: t`评论人姓名`,
  },
  commentedByName: {
    label: t`被评论人姓名`,
  },
  star: {
    label: t`评论星级`,
  },
  comment: {
    label: t`评论内容`,
  },
  orderType: {
    label: t`订单类型<br/> 1-包车订单<br/> 2-班车订单<br/> 3-巴士订单`,
  },
  commentDate: {
    label: t`评论时间`,
    text: DATETIME_TEXT,
  },
  commentType: {
    label: t`评论类型<br/> driver-司机对客户评论<br/> customer-客户对司机评论<br/> order-客户对订单评价`,
  },
  reviewer: {
    label: t`评论人`,
  },
  commentedBy: {
    label: t`被评论人`,
  },
  orderId: {
    label: t`订单id`,
  },
  crBy: {
    label: t`创建者`,
  },
  upBy: {
    label: t`最后修改者`,
  },
  crDate: {
    label: t`创建时间`,
  },
  upDate: {
    label: t`最后修收时间`,
  },
  tenantId: {
    label: t`租户ID`,
  },
};

